package boc.sx.gateway.core.strategy;

/*
 * @author zmx
 * @date 2022/8/9 9:58
 */
public enum LBWay {

    POLLING(1,"轮训"),
    WEIGHT(2,"权重");

    private int id;
    private String name;

    private LBWay(int id, String name) {
        this.id = id;
        this.name = name;
    }

    public static LBWay getLBWay(int number){
        switch (number){
            case 1: return  LBWay.POLLING;
            case 2: return  LBWay.WEIGHT;
            default: return LBWay.POLLING;
        }
    }

    public int getId() {
        return id;
    }
    public String getName() {
        return name;
    }
}
